﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class LobbyManager : MonoBehaviour
{	
	private string username;
	public Text welcometext;

	void Start()
	{
		username = AccountInfo.instance.Info.AccountInfo.Username;
		welcometext.text = ("Welcome, " + username + "!");
		welcometext.gameObject.SetActive (true);

	
	}
	public void LogOut()
	{	
		Debug.Log("Logged out");
		AccountInfo.instance.Info.AccountInfo = null;
		SceneManager.LoadScene (GameConstants.LoginScene);
	}

	public void FindMatch()
	{
		SceneManager.LoadScene (GameConstants.PlayScene);
	}
}
